﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;

namespace SosData
{
    public class EntityBase
    {
        
        private int _id;
        [Key]
        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }


        private int _CreatedByUserId = Parameters.UserId;
        public int CreatedByUserId
        {
            get { return _CreatedByUserId; }
            set { _CreatedByUserId = value; }
        }

        private DateTime _CreatedOn = DateTime.MinValue;
        public DateTime CreatedOn
        {
            get { return _CreatedOn; }
            set
            {
                _CreatedOn = value;
            }
        }

        private int _ModifiedByUserId = Parameters.UserId;
        public int ModifiedByUserId
        {
            get { return _ModifiedByUserId; }
            set { _ModifiedByUserId = value; }
        }

        private DateTime _ModifiedOn = DateTime.Now;
        public DateTime ModifiedOn
        {
            get { return _ModifiedOn; }

            set
            {
                _ModifiedOn = value;
            }
        }

        public EntityBase()
        {
            _CreatedOn = DateTime.Now;
        }
    }
}
